]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
automountManager: Don't mount already-mounted volumes
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 28 Sep 2011 20:29:45 +0000 (16:29 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 28 Sep 2011 20:51:02 +0000 (16:51 -0400)
Don't pester the user with autorun popups if a volume is already mounted.

https://bugzilla.gnome.org/show_bug.cgi?id=660397

js/ui/automountManager.js

index 93b093ab265cd64f7a513046ac4988c45ce05903..edcdd8091740a10b7a707b8883ac2bbf17d0fb09 100644 (file)
@@ -209,10 +209,14 @@ AutomountManager.prototype = {
             }
         }
 
+        // Volume is already mounted, don't bother.
+        if (volume.get_mount())
+            return;
+
         if (!this._settings.get_boolean(SETTING_ENABLE_AUTOMOUNT) ||
             !volume.should_automount() ||
             !volume.can_mount()) {
-           // allow the autorun to run anyway; this can happen if the
+            // allow the autorun to run anyway; this can happen if the
             // mount gets added programmatically later, even if 
             // should_automount() or can_mount() are false, like for
             // blank optical media.